package com.edu.udistrital.indexing;

import org.apache.lucene.util.Version;

import com.edu.udistrital.indexing.analyzer.Analyzer;
import com.edu.udistrital.indexing.analyzer.AnalyzerLearningEnglish;
import com.edu.udistrital.indexing.analyzer.AnalyzerLearningSpanish;
import com.edu.udistrital.indexing.document.DocumentIndex;
import com.edu.udistrital.indexing.document.LearningDocument;

public class LearningIndexer implements IndexerFactory {

	@Override
	public Analyzer fabricarAnalyzer(Version version, int idioma) {
		if(idioma == IndexerFactory.SPANISH) {
			return new AnalyzerLearningSpanish(version);
		} 
		
		if(idioma == IndexerFactory.ENGLISH) {
			return new AnalyzerLearningEnglish(version);
		}
		
		return null;
	}

	@Override
	public DocumentIndex fabricarDocumento() {
		return new LearningDocument();
	}



}
